import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: "/jy-trip",
    redirect: "/home"
  },
  {
    path: "/home",
    component: () => import("@/views/home/home.vue")
  },
  {
    path: "/favor",
    component: () => import("@/views/favor/favor.vue")
  },
  {
    path: "/order",
    component: () => import("@/views/order/order.vue")
  },
  {
    path: "/message",
    component: () => import("@/views/message/message.vue"),
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/city",
    component: () => import("@/views/city/city.vue"),
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/search",
    component: () => import("@/views/search/search.vue"),
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/detail/:houseId",
    component: () => import("@/views/detail/detail.vue"),
    meta: {
      hideTabBar: true
    }
  },
]

const router = createRouter({
  routes,
  history: createWebHistory()
})

export default router
